<?php
session_start();
if(empty($_SESSION['userId'])){
    header('HTTP/1.1 403');
    header("content-type:text/html;charset=utf-8");
    ?>
    <!doctype html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
    </head>
    <body>
        <h1>请登录否访问</h1>
    </body>
    </html>
<?php
    die;
}